package com.thomasmoerman.dci2.tmc

import com.thomasmoerman.dci2.domain._

trait UpdatableAccountAspect {
  this: MoneyTransferQueries =>
  
  trait UpdatableAccount {
    this: Account =>
    
    def increaseBalance(amount: Double) = persist(Increase(id, amount))
    
    def decreaseBalance(amount: Double) = persist(Decrease(id, amount))
    
  }
  
}